public class Test {
    public Test() {
        System.out.println("调用了无参构造方法");
    }
    public Test(int x) {
        System.out.println("调用了有参构造，值为"+x);
    }

    public static void main(String[] args) {
        Test t = new Test();
        Test t1 = new Test(5);
    }
}
